package com.geeaks.mybatis.generator.enums;

/**
 * @Description: 支持的数据库类型
 * @author gaoxiang
 * @date 2018年4月15日 下午10:02:09
 */
public enum EnumDbType {

	MySQL("com.mysql.jdbc.Driver", "jdbc:mysql://%s:%s/%s?useUnicode=true&useSSL=false&characterEncoding=%s", "mysql-connector-java-5.1.38.jar"),
	Oracle("oracle.jdbc.driver.OracleDriver", "jdbc:oracle:thin:@%s:%s:%s", "ojdbc14.jar"),
	PostgreSQL("org.postgresql.Driver", "jdbc:postgresql://%s:%s/%s", "postgresql-9.4.1209.jar"),
	SQL_Server("com.microsoft.sqlserver.jdbc.SQLServerDriver", "jdbc:sqlserver://%s:%s;databaseName=%s", "sqljdbc4-4.0.jar"),
	Sqlite("org.sqlite.JDBC", "jdbc:sqlite:%s", "sqlite-jdbc-3.19.3.jar");

	private final String driverClass;

	private final String connectionUrlPattern;

	private final String connectorJarFile;

	EnumDbType(String driverClass, String connectionUrlPattern, String connectorJarFile) {
		this.driverClass = driverClass;
		this.connectionUrlPattern = connectionUrlPattern;
		this.connectorJarFile = connectorJarFile;
	}

	public String getDriverClass() {
		return driverClass;
	}

	public String getConnectionUrlPattern() {
		return connectionUrlPattern;
	}

	public String getConnectorJarFile() {
		return connectorJarFile;
	}
}